//  Abstract:
//    OCF Object
//
//  Reference:
//    OEBPS Container Format (OCF) 1.0
//    http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm
//
//    NiH libzip
//    http://www.nih.at/libzip/
//
//  Design Notes:
//    Provide abstraction of ZIP container as specified in OCF 1.0
//    Require support of libzip
//
//  Disclaimer:
//    Copyright (C) 2008, Janice Law <janicel700@gmail.com>.
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _EPUB_OCF
#define _EPUB_OCF

#include <gtkmm.h>
#include <zip.h>
#include <libxml++/libxml++.h>
#include <boost/shared_ptr.hpp>
#include "opf.h"

using Glib::ustring;
using namespace boost;

namespace Epub
{
class Ocf
{
    public:
        Ocf();
        Ocf(ustring const archivePath);
        ~Ocf();
        ustring get_archive_path();
        shared_ptr<Opf> ReadOPF();
        void WriteOPF(shared_ptr<Opf> content);
        shared_ptr<xmlpp::Document> ReadXML(ustring const fileName);
        void WriteXML(ustring const fileName, shared_ptr<xmlpp::Document> content);
    protected:
        ustring archive_path;
};
} // Epub

#endif // _EPUB_OCF
